var previewSystem = {
  checkStyle: function() {
var vals = ['appstyle0', 'appstyle1', 'appstyle2' , 'appstyle5', 'apptab3', 'appbutton4', 'apptab4', 'appbutton3', 'apptab5'];
for (var i = 0; i < vals.length; i++)
	if (document.getElementById('sbbg' + i).hasAttribute('selected')) {
		window.document.getElementById('appstyle-preview-img').src = 'chrome://StrataBuddy/skin/options/preview-' + vals[i] + '.png';
		break;
		}
},

   checkOptions: function () {
var vals = ['apphide', 'hometabhide', 'newtabhide', 'tabclose'];
for (var i = 0; i < vals.length; i++)
	if (document.getElementById('cx' + i).hasAttribute('checked')) {
		 window.document.getElementById(vals[i] + '-preview-img').src = 'chrome://StrataBuddy/skin/options/preview-' + vals[i] + '.png';
} else {
 window.document.getElementById(vals[i] + '-preview-img').src = '';
}
}
};